package com.tpc.control.jpa;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * CommonDataId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class CommonDataId implements java.io.Serializable {

	// Fields

	private String productionNo;
	private String seq;

	// Constructors

	/** default constructor */
	public CommonDataId() {
	}

	/** full constructor */
	public CommonDataId(String productionNo, String seq) {
		this.productionNo = productionNo;
		this.seq = seq;
	}

	// Property accessors

	@Column(name = "production_no", nullable = false, length = 12)
	public String getProductionNo() {
		return this.productionNo;
	}

	public void setProductionNo(String productionNo) {
		this.productionNo = productionNo;
	}

	@Column(name = "seq", nullable = false, length = 1)
	public String getSeq() {
		return this.seq;
	}

	public void setSeq(String seq) {
		this.seq = seq;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof CommonDataId))
			return false;
		CommonDataId castOther = (CommonDataId) other;

		return ((this.getProductionNo() == castOther.getProductionNo()) || (this
				.getProductionNo() != null
				&& castOther.getProductionNo() != null && this
				.getProductionNo().equals(castOther.getProductionNo())))
				&& ((this.getSeq() == castOther.getSeq()) || (this.getSeq() != null
						&& castOther.getSeq() != null && this.getSeq().equals(
						castOther.getSeq())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getProductionNo() == null ? 0 : this.getProductionNo()
						.hashCode());
		result = 37 * result
				+ (getSeq() == null ? 0 : this.getSeq().hashCode());
		return result;
	}

}